/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package delete;

/**
 *
 * @author Vick
 */
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

@ManagedBean(name = "event")
@SessionScoped
public class EventBean implements Serializable
{
    private static List<Event> eventList = new ArrayList<>();

    public EventBean()
    {
	eventList.add(new Event("Futurism Seminar", new Date(), "Accademia di Brera", "Giacomo Balla"));
	eventList.add(new Event("JEE Basics", new Date(), "Politecnico di Milano", "Alan Turing"));
	eventList.add(new Event("Python Programming", new Date(), "Politecnico di Milano", "Tom Jones"));
	eventList.add(new Event("First Aid Course", new Date(), "Red Cross", "Marie Curie"));
	eventList.add(new Event("Healthy Meals", new Date(), "Esselunga", "Esselunga"));
	eventList.add(new Event("Traveling in Milan", new Date(), "ATM", "ATM"));
    }

    public List<Event> getEventList()
    {
	return eventList;
    }

    public static class Event
    {

	String eventName;
	Date date;
	String location;
	String organizerName;

	public Event(String eventName, Date date, String location, String organizerName)
	{
	    this.eventName = eventName;
	    this.date = date;
	    this.location = location;
	    this.organizerName = organizerName;
	}

	public Date getDate()
	{
	    return date;
	}

	public String getEventName()
	{
	    return eventName;
	}

	public String getLocation()
	{
	    return location;
	}

	public String getOrganizerName()
	{
	    return organizerName;
	}
    }
}
